package com.itheima2;

import java.util.ArrayList;

public class Work5 {
    public static void main(String[] args) {
       ArrayList<Student> stu = new ArrayList<>();
       Student student1 = new Student("吕布","001",18);
       Student student2 = new Student("赵云","002",19);
       Student student3 = new Student("典韦","003",20);
       stu.add(student1);
       stu.add(student2);
       stu.add(student3);

        for (Student student : stu) {
            System.out.println(student);
        }
    }
}
